Excercise 1

We can clearly see that this dataset is devisable into two groups

First we will implement logistic regression by hand

And afterwards with prebuilt libraries

Scikit solution

Excercise 2

Scikit solution